import service from '@/utils/request'
const { httpPost, httpGet } = service
//---------------采购结算-----------------------//
const request = {
    //获取采购结算列表
    getPurchaseSettlementListData (params) {
        return httpPost({
            url: '/turnoversettle/BuySettle/listByEntity',
            params
        })
    },
    //获取结算明细
    getPurchaseSettlementDetailed (params) {
        return httpGet({
            url: '/turnoversettle/BuySettle/getDtlList',
            params
        })
    },
    //获取服务费用
    getPurchaseSettlementServiceFee (params) {
        return httpGet({
            url: '/turnoversettle/BuySettle/getFreightDtl',
            params
        })
    },
    //获取保证金
    getPurchaseSettlementBond (params) {
        return httpGet({
            url: '/turnoversettle/BuySettle/getDepositDtlList',
            params
        })
    },
    //查询剩余预付款金额
    getAdvancePayment (params) {
        return httpGet({
            url: '/turnoversettle/BuySettle/getAdvancePayment',
            params
        })
    },
    //新增采购结算
    addPurchaseSettlementData (params) {
        return httpPost({
            url: '/turnoversettle/BuySettle/insert',
            params
        })
    },
    //根据id查询基本信息
    queryBasicInformation (params) {
        return httpGet({
            url: '/turnoversettle/BuySettle/getBuySettle',
            params
        })
    },
    //删除采购结算
    deletePurchaseSettlement (params) {
        return httpGet({
            url: '/turnoversettle/BuySettle/delete',
            params
        })
    },
    //保存基本信息
    preservePurchaseSettlement (params) {
        return httpPost({
            url: '/turnoversettle/BuySettle/update',
            params
        })
    },
    //更新结算明细
    updetePurchaseSettlementDetailed (params) {
        return httpPost({
            url: '/turnoversettle/BuySettle/updateDtl',
            params
        })
    },
    //更新服务运费
    updetePurchaseSettlementServiceCharge (params) {
        return httpPost({
            url: '/turnoversettle/BuySettle/updateFreightDtl',
            params
        })
    },
    //更新保证金
    updetePurchaseSettlementBond (params) {
        return httpPost({
            url: '/turnoversettle/BuySettle/updateDeppsitDtl',
            params
        })
    },
    //初始化红单
    initializationRed (params) {
        return httpGet({
            url: '/turnoversettle/BuySettle/initRed',
            params
        })
    },
    //周材验收历史数据接口
    checkBeforeAcceptance (params) {
        return httpPost({
            url: '/turnover/audit/getAuditHistory',
            params
        })
    },
    //校验合同或计划是否在变更中
    checkIsChange (params) {
        return httpGet({
            url: '/turnoversettle/BuySettle/checkIsChange',
            params
        })
    },
    //获取冲销对象
    getReversalObject (params) {
        return httpGet({
            url: '/turnoversettle/BuySettle/getReversalObject',
            params
        })
    },
    //获取物资采购合同基本信息
    getContractInfo (params) {
        return httpGet({
            url: '/subcontract/materialProcurementApply/getInfo',
            params
        })
    },
    //判断当前结算日期是否已经办理月结
    isMonthly (params) {
        return httpGet({
            url: '/turnover/rmonthlySettlement/isMonthly',
            params
        })
    },

}
export default request